﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;

namespace Autocentro.Entities
{
    public class PROVEEDOR:BaseEntity
    {
        public Int32 Id { get; set; }

        [Display(Name = "Ruc")]
        //[MaxLength(11, ErrorMessage = "El RUC necesita 8 u 11 dígitos")]
        //[MinLength(8, ErrorMessage = "El RUC necesita 8 u 11 dígitos")]
        [Required(ErrorMessage = "El RUC es requerido")]
        public string Ruc { get; set; }
        
        [Display(Name = "RazonSocial")]
        [Required(ErrorMessage = "La Razón Social es requerida")]
        public string RazonSocial { get; set; }
        
        public string Telefono { get; set; }
        
        public string Direccion { get; set; }

        public List<COMPRAS> Compra { get; set; }

        public override string ToString()
        {
            return RazonSocial;
        }
    }
}
